<!--  -->
<template>
    <div>
        <ul class="table w1021" v-if="data.length != 0">
            <li
                class="tableTr flex tableBody top"
                @click="detail(item)"
                v-for="(item, index) in data"
                :key="index"
            >
                <span class="orange tableTd flex1">{{ item.rptTitle }}</span>
                <span class="orange tableTd w130 fr">{{ item.declareDate }}</span>
            </li>
        </ul>
        <div class="tableNone orange w1021" v-else>暂无数据</div>
        <div class="page w1021" v-if="data.length != 0">
            <span>注：点击标题名称可查看全文</span>
            <el-pagination
                small
                layout="prev, pager, next"
                :page-size="10"
                :total="total"
                :current-page="currentPage"
                @current-change="changePage"
            ></el-pagination>
        </div>
    </div>
</template>

<script>
import {BASE_URL} from "@/common/const";
import {openWeb} from "@/common/common";

export default {
    data() {
        return {currentPage: 1};
    },
    props: ["data", "type", "title", "total", "infoType"],
    methods: {
        changePage(page) {
            this.$emit("page", {page, infoType: this.infoType});
        },
        detail(ops) {

            let {seq = '',stockId = '',kcType = ''} = ops;

            const url = this.urlAbsolute(`/newDetail/index.html?newId=${seq}&stockId=${stockId}&kcType=${kcType}&type=2`);
            openWeb(url,this.title,1)
        }
    },
};
</script>
<style lang="scss" scoped></style>
